import { betModel } from '@/types/model'
import { AbstractDraw } from './AbstractDraw'

export class DrawCurve extends AbstractDraw {
  constructor(ctx: CanvasRenderingContext2D, startY: number, private bets: betModel[]) {
    super(ctx, startY)
  }

  // 绘制曲线
  public draw() {
    for (const bet of this.bets) {
      // 绘制曲线-大引绳 顺向
      const curvexy = bet.curvexy
      super.drawPolyline(JSON.parse(curvexy), '#2980b9', 2)
    }
  }
}
